/*
 ------------------------------------------------------------------------------
 Copyright (C) 2006-2007 Team Blur.

 This file is part of the Quantum Engine source code.

 The Quantum Engine source code is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or (at your
 option) any later version.

 The Quantum Engine source code is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 more details.

 You should have received a copy of the GNU General Public License along with
 the Quantum Engine source code; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 ------------------------------------------------------------------------------
*/


#ifndef __PROTOCOL_H__
#define __PROTOCOL_H__


/*
 ==============================================================================

 Protocol:

 This is for basic communication between client and server in the engine.
 The game modules define their own protocol for communicating entities and
 other game related information.

 ==============================================================================
*/

#define	PROTOCOL_VERSION			5

#define MAX_RELIABLE_COMMANDS		64			// Max string commands buffered for retransmit

#define MAX_DOWNLOAD_BLOCK_SIZE		2048		// Max size of a download file block

// Server to client
typedef enum {
	SVC_BAD,
	SVC_NOP,
	SVC_SERVERSTATE,
	SVC_GAMESTATE,
	SVC_DOWNLOAD,
	SVC_SNAPSHOT,
	SVC_COMMAND,
	SVC_EOF
} svcOps_t;

// Client to server
typedef enum {
	CLC_BAD,
	CLC_NOP,
	CLC_MOVE,
	CLC_MOVENODELTA,
	CLC_COMMAND,
	CLC_EOF
} clcOps_t;


#endif	// __PROTOCOL_H__
